﻿using System.Windows;
using System.Windows.Markup;
using System.Globalization;
namespace Renci.iRods.Studio
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        static App()
        {
            FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
        }

        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            // Configure Bootstrapper
            var bootstrapper = new Bootstrapper();
            bootstrapper.Run();


            //IoC.InitializeWithMef();

            //var shell = IoC.GetInstance<ShellViewModel>();

            //  Register services
            //ServiceLocator.RegisterSingleton<IDialogService, DialogService>();
            //ServiceLocator.RegisterSingleton<IProfileService, ProfileService>();

            //var window = new MainWindow();
            //var viewModel = new MainWindowViewModel();

            //EventHandler handler = null;
            //handler = delegate
            //{
            //    viewModel.RequestClose -= handler;
            //    window.Close();
            //};

            //viewModel.RequestClose += handler; 
            //window.DataContext = viewModel;

            //window.Show();

        }
    }
}
